import request from '@/utils/request'

// 查询企业公告列表
export function listEnterpriseAnnouncement(query) {
    return request({
        url: '/system/announcement/listEnterprise',
        method: 'get',
        params: query
    })
}

// 查询供应商公告列表
export function listSupplierAnnouncement(query) {
    return request({
        url: '/system/announcement/listSupplier',
        method: 'get',
        params: query
    })
}

// 查询公告详细
export function getAnnouncement(id) {
    return request({
        url: '/system/announcement/' + id,
        method: 'get'
    })
}

// 新增公告
export function addAnnouncement(data) {
    return request({
        url: '/system/announcement',
        method: 'post',
        data: data
    })
}

// 修改公告
export function updateAnnouncement(data) {
    return request({
        url: '/system/announcement',
        method: 'put',
        data: data
    })
}

// 删除公告
export function delAnnouncement(id) {
    return request({
        url: '/system/announcement/' + id,
        method: 'delete'
    })
}

// 发布公告
export function updateByIds(data) {
    return request({
        url: '/system/announcement/updateByIds',
        method: 'post',
        data: data
    })
}

// 删除公告
export function deleteByIds(data) {
    return request({
        url: '/system/announcement/deleteByIds',
        method: 'post',
        data: data
    })
}